//JavaScript Framework 2.0 Code
try{
Type.registerNamespace('com.yonyou.ncmm_pac_pda.MMIssue_QueryCondsController');
com.yonyou.ncmm_pac_pda.MMIssue_QueryCondsController = function() {
    com.yonyou.ncmm_pac_pda.MMIssue_QueryCondsController.initializeBase(this);
    this.initialize();
}
function com$yonyou$ncmm_pac_pda$MMIssue_QueryCondsController$initialize(){
    //you can programing by $ctx API
    //get the context data through $ctx.get()
    //set the context data through $ctx.push(json)
    //set the field of the context through $ctx.put(fieldName, fieldValue)
    //get the parameter of the context through $ctx.param(parameterName)
    //Demo Code:
    //    var str = $ctx.getString();      //获取当前Context对应的字符串
    //    alert($ctx.getString())          //alert当前Context对应的字符串
    //    var json = $ctx.getJSONObject(); //获取当前Context，返回值为json
    //    json["x"] = "a";        //为当前json增加字段
    //    json["y"] = [];           //为当前json增加数组
    //    $ctx.push(json);            //设置context，并自动调用数据绑定
    //    
    //    put方法需手动调用databind()
    //    var x = $ctx.get("x");    //获取x字段值
    //    $ctx.put("x", "b");     //设置x字段值
    //    $ctx.put("x", "b");     //设置x字段值
    //    $ctx.databind();            //调用数据绑定才能将修改的字段绑定到控件上
    //    var p1 = $param.getString("p1");   //获取参数p2的值，返回一个字符串
    //    var p2 = $param.getJSONObject("p2");   //获取参数p3的值，返回一个JSON对象
    //    var p3 = $param.getJSONArray("p3");   //获取参数p1的值，返回一个数组
    
    //your initialize code below...
    
}
    
function com$yonyou$ncmm_pac_pda$MMIssue_QueryCondsController$evaljs(js){
    eval(js)
}
com.yonyou.ncmm_pac_pda.MMIssue_QueryCondsController.currentQueryCondition=null;
function com$yonyou$ncmm_pac_pda$MMIssue_QueryCondsController$button0_onclick(sender, args){

//保存查询条件后，返回查询列表，同时刷新查询列表。

$ctx.dataCollect();
com.yonyou.ncmm_pac_pda.MMIssue_QueryCondsController.currentQueryCondition={
		"vbillcodemo_fulllike":$ctx.getString("qrytxtvbillcodemo"),
		"vbillcodepickm_fulllike":$ctx.getString("qrytxtvbillcodepickm"),
		"drequiredate_dategrteq":$ctx.getString("qrytxtdrequiredate_start"),
		"drequiredate_datelseq":$ctx.getString("qrytxtdrequiredate_end"),
		"dbilldatemo_dategrteq":$ctx.getString("qrytxtdbilldatemo_start"),
		"dbilldatemo_datelseq":$ctx.getString("qrytxtdbilldatemo_end"),
		
	};
	NCMMPubUtil.queryVOByConditions(PickmHeadVO,com.yonyou.ncmm_pac_pda.MMIssue_QueryCondsController.currentQueryCondition,function(data){
		var json={listdata:data};
		$ctx.push(json);
	});
	
	
	

}
//保存数据到本地库表
//VOClassHead：主表vo
//VOClassBody：子表vo，单表时为空
//vos：插入数据
function addNewData2Local(VOClassHead, VOClassBody, vos){
	//获取VO数据记录数
	var vocount = NCMMDBUtil.getBillCount(vos);
	if(vocount > 0){
		//清除本地原有数据
		NCMMDBUtil.clearAllOldData(VOClassHead, VOClassBody);
		//更新VO到本地表
		vocount = NCMMDBUtil.addNewDatas(VOClassHead, VOClassBody, vos);
	}
	
	$alert("下载了【" + vocount +"】条数据。" );	
}


com.yonyou.ncmm_pac_pda.MMIssue_QueryCondsController.prototype = {
    panel6_onload : com$yonyou$ncmm_pac_pda$MMIssue_QueryCondsController$panel6_onload,
    button0_onclick : com$yonyou$ncmm_pac_pda$MMIssue_QueryCondsController$button0_onclick,
    initialize : com$yonyou$ncmm_pac_pda$MMIssue_QueryCondsController$initialize,
    evaljs : com$yonyou$ncmm_pac_pda$MMIssue_QueryCondsController$evaljs
};
com.yonyou.ncmm_pac_pda.MMIssue_QueryCondsController.registerClass('com.yonyou.ncmm_pac_pda.MMIssue_QueryCondsController',UMP.UI.Mvc.Controller);
}catch(e){$e(e);}
